{extend name="shop/default/base" /}
{block name="resources"}
<script src="__TEMP__/{$style}/public/js/goods/controlGoods.js"></script>
<script src="__TEMP__/{$style}/public/js/ns_collections.js" type="text/javascript"></script>
{/block}

{block name="headGoodType"}
{include file='shop/default/controlHeadGoodType'/}

{/block}

{block name="main"}
<div class="w1210 main1210">
<!--主体商品内容展示-->
	<form name="compareForm" action="" method="post" onsubmit="" id="table_list">
	
		<ul class="list-grid clearfix js-list-grid">
			{foreach name="goods_list" item="goods" key="k"}
			<li class="item {if condition='$k neq 0 && ($k+1)%4==0'}last{/if}">
				<div class="item-con">
					
					<div class="item-pic">
						<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" title="{$goods.goods_info.goods_name}" target="_blank">
							<img src="{:__IMG($default_goods_img)}" class="lazy_load" data-original="{:__IMG($goods['picture_info']['pic_cover_mid'])}">
						</a>
					</div>
					<div class="item-info">
						<div class="item-price"><em class="sale-price money-color">￥{$goods.goods_info.promotion_price}</em></div>
						<div class="item-name"><a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" title="{$goods.goods_info.goods_name}">{$goods.goods_info.goods_name}</a></div>
						<div class="item-con-info">
							<div class="fr" style="float: left;margin-right: 5px;">
								<div class="item-add-cart">
										{if condition="$goods['goods_info']['goods_type'] == 1 "}
											<!-- 实物商品 -->
											{if condition="$goods['goods_info']['stock'] neq '0'"}
												<a href="javascript:ShowGoodsAttribute({$goods.goods_id},'{$goods.goods_info.goods_name}',{$goods.picture_info.pic_id},this,{if condition='$goods.goods_info.max_buy==0' }{$goods.goods_info.stock}{else/}{$goods.goods_info.max_buy}{/if},{$goods.goods_info.state});" class="add-cart" title="{:lang('goods_add_cart')}"><i class="icon-cart"></i>{:lang('goods_add_cart')}</a>
											{else /}
												<a href="javascript:;" class="add-cart" title="{:lang('goods_add_cart')}" style="background: #bbb;"><i class="icon-cart"></i>{:lang('goods_add_cart')}</a>
											{/if}
										{else/}
											<!-- 虚拟商品，没有加入购物车 -->
											<a href="{:__URL('SHOP_MAIN/goods/goodsinfo','goodsid='.$goods['goods_id'])}" target="_blank" class="add-cart" title="{:lang('view_details')}">{:lang('view_details')}</a>
										{/if}
								</div>
							</div>
							<div class="fl">
								<div class="item-operate {if condition="$goods.is_favorite>0"}is_favorite{/if}">
										<a href="javascript:;" class="operate-btn collet-btn  goods-collect" onclick="collectionGoods({$goods.goods_id},'goods','{$goods.goods_info.goods_name}',this,false)">
										<i {if condition="$goods.is_favorite>0"}style="background-position:-107px -11px;"{/if} data-log-id="{$goods.is_favorite}"></i>
										<span> {if condition="$goods.is_favorite>0"}{:lang('goods_collected')}
					 							{else/}{:lang('goods_collection')}{/if}
					 					</span>
									</a>
								</div>
							</div>
					
						</div>
					</div>
				</div>
			</li>
			{/foreach}
		<!-- JS加载商品列表数据【大图模式】 -->
		</ul>
		{if condition="$total_count==0"}
		<div class="tip-box">
			<i class="tip-icon"></i>
			<div class="tip-text">Sorry！{:lang('goods_no_goods_you_want')}……</div>
		</div>
		{/if}
		
		<!--分页-->
		<div class="js-show-page">
		{include file='shop/default/controlCommonPage'/}
		</div>
			{include file='shop/default/Goods/controlPopUpGoodsSkuAttribute'/}
			{include file='shop/default/controlLoveOrHistory' /}
	</form>
</div>	
{/block}

{block name="javascript"}
{/block}